<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
        $this->assign('phone', '123456');
        $this->display();
    }

    public function getJson(){
        $res = [["name"=> "Nexus SX",
            "snippet"=> "Fast just got faster with Nexus S.",
            "age"=> 0],
        ["name"=> "Motorola XOOM™ with Wi-Fi",
            "snippet"=> "The Next, Next Generation tablet.",
            "age"=> 2],
        ["name"=> "MOTOROLA XOOM™",
            "snippet"=> "The Next, Next Generation tablet.",
            "age"=> 4]
        ];
        $this->ajaxReturn($res);
    }

    public function test(){
        $this->display();
    }
}